package DailyPractice.Day9;

import java.util.Scanner;

/**
 * @author lumin
 * @date 2022/04/26 19:47
 **/
public class Num2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //列
        int m = sc.nextInt();
        //行
        int n = sc.nextInt();
        int[][] arr = new int[n][m];
        int i = 0;
        while(i < n){
            int j = 0;
            while(j < m){
                if(i == 0){
                    if(j == 0){
                        arr[i][j] = 2;
                    }else{
                        arr[i][j] = arr[i][j - 1] + 1;
                    }
                }else{
                    if(j == 0){
                        arr[i][j] = arr[i - 1][j] + 1;
                    }else{
                        arr[i][j] = arr[i - 1][j] + arr[i][j - 1];
                    }
                }
                j++;
            }
            i++;
        }
        System.out.println(arr[n - 1][m - 1]);
    }
}